@import 'config.scss';

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
  
ul {
    list-style: none;
}

a, area, button, [role=button], input, label, select, summary, textarea {
    touch-action: manipulation;
}

input,
textarea {
    -webkit-appearance:none;
}

i,a {
    text-decoration: none;
}

img {
    width: 100%;
    height: 100%;
}

body,html{
    width: 100%;
    height: 100%;
    overflow: hidden;
    min-width: 350px;
    font-family: $fontFamily_2;
    font-size: $medium;
    color: $TextColor;
    -webkit-tap-highlight-color:transparent;
}


#app {
    width: 100%;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    overflow-y: auto;
    overflow-x: auto;
    background-color: $BackgroundColor;
    @extend .scrollbar;
}

.gs-filter {
    background-color: hsla(0,0%,100%,.25);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(30px);
    box-shadow: none;
    transition: all .5s;
}

.container {
    @include full;
    @extend .scrollbar;
    overflow-y: auto;
    overflow-x: hidden;
}

.scrollHidden {
    overflow: hidden;
    overflow-y: hidden;
    overflow-x: hidden;
}

.scrollY {
    overflow-y: auto;
}

.scrollX {
    overflow-x: auto;
}

.scrollXHidden {
    overflow-x: hidden;
}

.scrollYHidden {
    overflow-y: hidden;
}

.scrollAuto {
    overflow: auto;
}

.pointer {
    cursor: pointer;
}

.full-layout {
    width: 100%;
    height: 100%;
}


.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.oneline {
    @include ellipsis(1)
}

.twoline {
    @include ellipsis(2)
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-start {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column-center {
    @extend .flex-center;
    flex-direction: column;
}

.flex-column-start {
    @extend .flex-start;
    align-items: flex-start;
    flex-direction: column;
}

.flex-column-end {
    @extend .flex-end;
    align-items: flex-end;
    flex-direction: column;
}

.flex-nowarp {
    flex-wrap: nowrap;
}

.flex-warp {
    flex-wrap: wrap;
}

.full-w {
    width: 100%;
}

.full-h {
    height: 100%;
}

.absolute-full {
    @include full;
}

// element plus 自定义样式

.z-popover {
    z-index: 2101 !important;
}

.z-popper {
    top:70px !important;
}

.el-dialog.z-dialog {
    border-radius: 12px;
}

.el-dialog.z-dialog-1 {
    border-radius: 12px;
    margin-top: 5vh;
}
 
.el-drawer.ttb.z-drawer {
    min-width: 300px;
    top: 60px;
}

.el-drawer.rtl.z-drawer {
    text-align: left;
}

.el-drawer.rtl.z-drawer .el-drawer__body {
    overflow: hidden;
    padding: 0;
}

.el-message.z-message {
    top: 65px !important;
}

.el-message-box.z-message-box {
    border-radius: 12px;
}


.header-box {
    height: 40px;
    width: 100%;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;

    .title {
        color:$TextColor;
        font-size: 20px;
        margin-left: 10px;
    }

    .icon {
        margin-right: 10px;
        margin-top: 3px;
        transition: all .3s;
        &:hover {
            color: $PrimaryColor;
        }
    }
}


.input-search {
    min-width: 200px;
    width: 100%;
    height: 40px;
    border-radius: 5px;
    display: flex;
    // grid-template-columns: 15% 85%;
    background-color: $ShadowColor;
    padding: 0 .4rem;
    border: 1px solid #f2f2f2;
    transition: all .5s;

    &:hover {
        border: 1px solid $PrimaryColor;
        background-color: $PageBackgroundColor;
        i {
            color: $PrimaryColor;
        }
    }
     &:focus-within {
        border: 1px solid $PrimaryColor;
        background-color: $BackgroundColor;
        i {
            color: $PrimaryColor;
        }
    }

    i {
        height: 40px !important;
        width: 40px !important;
        text-align: center !important;
        line-height: 39px !important;
        color: #c5b9b9 !important;
        font-size: 15px !important;
    }

    input {
        width: 100%;
        height: 40px;
        background: none;
        outline: none;
        border: none;
        line-height: 1;
        font-weight: 400;
        font-size: 15px;
        color: $TextColor;
        // margin-bottom: 2px;

        &::placeholder {
            color: #c5b9b9;
            font-weight: 400;
        }
    }
    
    
}


.list-box-loading {
    position: absolute !important;
    top: 50%;
    left: 0%;
    width: 100%;
}


.active {
    background-color: $ShadowColor;
}

.btn-block {
    margin-top: 20px;

    button {
        width: 100%;
        padding: 20px;
    }
}


.contextmenu {
    margin: 0;
    background: $BackgroundColor;
    z-index: 3000;
    position: absolute;
    list-style-type: none;
    padding: 5px 0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    color: $TextColor;
    box-shadow: 0 0px 10px 0px $ShadowColor;

    li {
        margin: 0;
        padding: 7px 16px;
        cursor: pointer;

        &:hover {
            background: $ShadowColor;
        }
    }
}

.text-info {
    text-align: center;
    color:#808080;
    font-size: 14px;
}
  


@keyframes islandAnimationExpand {
    0% {
        width: 250px;
        height: 40px;
    }
    40% {
        width: 500px;
    }
    60% {
        border-radius: 30px;
    }
    80% {
        height: auto;
        transform: translateX(-50%) scaleX(1.04);
    }
    100% {
        width: 500px;
        height: auto;
        border-radius: 30px !important;
        transform: translateX(-50%) scaleX(1);
    }
}

@keyframes islandAnimationCollapse {
    0% {
        width: 500px;
        height: auto;
        border-radius: 30px;
    }
    20% {
        height: 80px;
        border-radius: 40px;
    }
    40% {
        height: 70px;
        border-radius: 50px;
    }
    60% {
        height: 60px;
        border-radius: 60px;
    }
    80% {
        // height: 40px;
        // width: 300px;
        border-radius: 80px;
        transform: translateX(-50%) scaleX(.8);
    }
    100% {
        width: 250px;
        height: 40px;
        border-radius: 80px;
        transform: translateX(-50%) scaleX(1);
    }
}


@keyframes Hide {
    0% {
        display: block;
        opacity: 1;
        // transform: translateY(0);
    }
    60% {
        // transform: translateY(-1%);
        opacity: .6;
        transform: translate(-50%, 0) scale(1.06);
    }
    80% {
        // transform: translateY(-10%);
        opacity: .3;
        transform: translate(-50%, 0) scale(1);
    }
    100% {
        display: none;
        opacity: 0;
        // transform: translateY(-100%);
    }
}
  
@keyframes Show {
    0% {
        display: none;
        opacity: 0;
        // transform: translateY(-100%);
    }
    60% {
        opacity: .3;
        transform: translate(-50%, 0) scale(1.06);
    }
    80% {
        opacity: .6;
        // transform: translateY(-1%);
    }
    100% {
        opacity: 1;
        // transform: translateY(0);
        transform: translate(-50%, 0) scale(1);
        display: block;
    }
}

.xpDialog-enter-active {
    animation: Show .3s ease-in-out 0s forwards;
}

.xpDialog-leave-active {
    animation: Hide .3s ease-in-out 0s forwards;
}


.spinner {
    width: 56px;
    height: 56px;
    display: grid;
    border: 4px solid #0000;
    border-radius: 50%;
    border-right-color: #004dff;
    animation: spinner-loading 1s infinite linear;
}
   
.spinner::before,
.spinner::after {
content: "";
    grid-area: 1/1;
    margin: 2px;
    border: inherit;
    border-radius: 50%;
    animation: spinner-loading 2s infinite;
}

.spinner::after {
    margin: 8px;
    animation-duration: 3s;
}

@keyframes spinner-loading {
    100% {
        transform: rotate(1turn);
    }
}
